<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/common :: head" />
<body>
    <div th:replace="fragments/common :: jQuery" />
    <div class="portletBody">
        <div id="menu" th:include="fragments/menus :: main (index)" />
        <div class="sak-banner-info" th:if="${student == null}" th:text="${literalErrorMessage}"></div>
        <br/>
        <p th:if="${student != null}" th:text="#{grade_view}"></p>
        <br/>
	<div class="table-responsive">
        <table th:if="${student != null}" id="groupTable" class="table table-striped table-bordered table-hover">
            <thead>
                <tr>
                    <span th:each="heading, iterStats : ${currentGradebook.headings}">
                        <span th:if="${iterStats.first}">
                            <th th:text="#{username}"></th>
                        </span>
                        <span th:if="!${iterStats.first}">
                            <th th:text="${heading}"></th>
                        </span>
                    </span>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td th:text="${student?.username}"></td>
                    <td th:text="${grade}" th:each="grade : ${student?.grades}"></td>
                </tr>
            </tbody>
        </table>
	</div>
        <div class="act">
            <input accesskey="x" type="button" th:onclick="cancelAction()" id="gradebook-cancel-button" th:value="#{back}">
        </div>
    </div>
</body>
</html>
